Extensions, such as ActiveX® controls, can display content in their own window that is displayed over a window displayed by the host program, or in a windowless mode in which the content displayed by the extension is composited with content displayed by the host program. However, when displaying content in a windowless mode, the host program typically begins displaying content on a surface and then provides that surface to the extension. The extension displays its content on that surface, and then returns that surface to the host program. This technique involves significant resource usage and can be time consuming, reducing the performance of the displaying by the extension and the host program.